/**物流设置-发货渠道API**/
import obj from '@/utils/request'
let {request,baseURL} = obj
//查询所有渠道信息
export function getChannel(params) {
  return request({
    url: '/deliveryChannel',
    method: 'get',
    params
  })
}
//添加渠道信息
export function addChannel(data) {
  return request({
    url: '/deliveryChannel',
    method: 'post',
    data
  })
}
//修改渠道信息
export function modChannel(data) {
  return request({
    url: '/deliveryChannel',
    method: 'put',
    data
  })
}
//删除渠道信息
export function delChannel(ids) {
  return request({
    url: '/deliveryChannel',
    method: 'delete',
    data:ids
  })
}
//禁用启用渠道信息
export function disableOrEnableChannel(stores,params) {
  return request({
    url: '/deliveryChannel/disableOrEnable',
    method: 'put',
    data:stores,
    params
  })
}
//查询单个的渠道信息
export function getChannelById(id) {
  return request({
    url: '/deliveryChannel/'+id,
    method: 'get',
  })
}
//查询所有发货渠道的id及名字的对应关系
export function getChannelMap() {
  return request({
    url: '/deliveryChannel/idNameMap',
    method: 'get',
  })
}
